﻿#region Copyright

// // ======================================================
// //     Copyright (c) 2011 Toulr All rights reserved.
// //    
// //     The use and distribution terms for this software are contained in the file
// //     named license.txt, which can be found in the root of this distribution.
// //     By using this software in any fashion, you are agreeing to be bound by the
// //     terms of this license.
// //    
// //     You must not remove this notice, or any other, from this software.
// // ======================================================

#endregion

#region Using Namespaces

using System;

#endregion

namespace Toulr.Util
{

    #region

    #endregion

    /// <summary>
    ///   A custom exception class
    /// </summary>
    public class ToulrException : ApplicationException
    {
        /// <summary>
        ///   Initializes a new instance of the <see cref = "ToulrException" /> class.
        /// </summary>
        public ToulrException()
            : base("There is an unknow error occurred！")
        {
        }

        /// <summary>
        ///   Initializes a new instance of the <see cref = "ToulrException" /> class.
        /// </summary>
        /// <param name = "message">The message.</param>
        public ToulrException(string message)
            : base(message)
        {
            Console.WriteLine(message);
        }

        /// <summary>
        ///   Initializes a new instance of the <see cref = "ToulrException" /> class.
        /// </summary>
        /// <param name = "message">The message.</param>
        /// <param name = "inner">The inner.</param>
        public ToulrException(string message, Exception inner)
            : base(message, inner)
        {
        }

        /// <summary>
        ///   Creates and returns a string representation of the current exception.
        /// </summary>
        /// <returns>
        ///   A string representation of the current exception.
        /// </returns>
        /// <PermissionSet>
        ///   <IPermission class = "System.Security.Permissions.FileIOPermission, mscorlib, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version = "1" PathDiscovery = "*AllFiles*" />
        /// </PermissionSet>
        public override string ToString()
        {
            return base.Message;
        }
    }
}